let { Menu } = require('electron')

let menTemplate = [
  {
    label: '文件',
    submenu: [
      {
        label: '新建',
        accelerator: 'ctrl+n',
        click () {
          console.log('file')
        }
      }
    ]
  },
  {
    label: '窗口',
    submenu: [
      {
        label: '新建窗口',
        accelerator: 'ctrl+w',
        click () {
          console.log('new Win')
        }
      }
    ]
  }
]

let bMenu = Menu.buildFromTemplate(menTemplate)

Menu.setApplicationMenu(bMenu)